<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>    
    <div id="app">
        <input type="button" value="修改msg" @click="changeMsg">
        <div>{{msg}}</div>
        <div>{{msg}}</div>
        <div>{{str}}</div>
        <input type="button" value="修改str" @click="changeStr">
    </div>
    <script src="./js/vue.global.js"></script>
    <script>
       
        let app = Vue.createApp({
            data(){
                return {
                    msg:"hello",
                    str:"hi"
                }
            },
            renderTracked(event){
                console.log("renderTracked:event",event);
            },
            renderTriggered(event){
                console.log("renderTriggered:event",event);
            },
            methods:{
                changeMsg(){
                    this.msg+="1";
                },
                changeStr(){
                    this.str+="2";
                }
            }

        });
      
        app.mount("#app");

    </script>
</body>
</html>